3.699 \(\int \frac{(d \cos (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=227 \[ \frac{b^2 \tan ^3(e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac{3}{2};2,\frac{m+2}{2};\frac{5}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{3 a^4 f}+\frac{\tan (e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac{1}{2};2,\frac{m+2}{2};\frac{3}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a^2 f}+\frac{2 a b (d \cos (e+f x))^m \, _2F_1\left (2,-\frac{m}{2};1-\frac{m}{2};\frac{b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )^2} \]

[Out]

(2*a*b*(d*Cos[e + f*x])^m*Hypergeometric2F1[2, -m/2, 1 - m/2, (b^2*Sec[e + f*x]^2)/(a^2 + b^2)])/((a^2 + b^2)^
2*f*m) + (AppellF1[1/2, 2, (2 + m)/2, 3/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan[e + f*x]^2]*(d*Cos[e + f*x])^m*(Sec[
e + f*x]^2)^(m/2)*Tan[e + f*x])/(a^2*f) + (b^2*AppellF1[3/2, 2, (2 + m)/2, 5/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan
[e + f*x]^2]*(d*Cos[e + f*x])^m*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x]^3)/(3*a^4*f)

________________________________________________________________________________________

Rubi [A]  time = 0.276633, antiderivative size = 227, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {3515, 3512, 757, 429, 444, 68, 510} \[ \frac{b^2 \tan ^3(e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac{3}{2};2,\frac{m+2}{2};\frac{5}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{3 a^4 f}+\frac{\tan (e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac{1}{2};2,\frac{m+2}{2};\frac{3}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a^2 f}+\frac{2 a b (d \cos (e+f x))^m \, _2F_1\left (2,-\frac{m}{2};1-\frac{m}{2};\frac{b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(d*Cos[e + f*x])^m/(a + b*Tan[e + f*x])^2,x]

[Out]

(2*a*b*(d*Cos[e + f*x])^m*Hypergeometric2F1[2, -m/2, 1 - m/2, (b^2*Sec[e + f*x]^2)/(a^2 + b^2)])/((a^2 + b^2)^
2*f*m) + (AppellF1[1/2, 2, (2 + m)/2, 3/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan[e + f*x]^2]*(d*Cos[e + f*x])^m*(Sec[
e + f*x]^2)^(m/2)*Tan[e + f*x])/(a^2*f) + (b^2*AppellF1[3/2, 2, (2 + m)/2, 5/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan
[e + f*x]^2]*(d*Cos[e + f*x])^m*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x]^3)/(3*a^4*f)

Rule 3515

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rule 3512

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(d^(2
*IntPart[m/2])*(d*Sec[e + f*x])^(2*FracPart[m/2]))/(b*f*(Sec[e + f*x]^2)^FracPart[m/2]), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rule 757

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + c*x^2)^p, (d/(d
^2 - e^2*x^2) - (e*x)/(d^2 - e^2*x^2))^(-m), x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&
!IntegerQ[p] && ILtQ[m, 0]

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 444

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 510

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(a^p*c^q
*(e*x)^(m + 1)*AppellF1[(m + 1)/n, -p, -q, 1 + (m + 1)/n, -((b*x^n)/a), -((d*x^n)/c)])/(e*(m + 1)), x] /; Free
Q[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, n - 1] && (IntegerQ[p] || GtQ[a
, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \frac{(d \cos (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int \frac{(d \sec (e+f x))^{-m}}{(a+b \tan (e+f x))^2} \, dx\\ &=\frac{\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{(a+x)^2} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac{\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \left (\frac{a^2 \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (a^2-x^2\right )^2}-\frac{2 a x \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (a^2-x^2\right )^2}+\frac{x^2 \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (-a^2+x^2\right )^2}\right ) \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac{\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \frac{x^2 \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (-a^2+x^2\right )^2} \, dx,x,b \tan (e+f x)\right )}{b f}-\frac{\left (2 a (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \frac{x \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (a^2-x^2\right )^2} \, dx,x,b \tan (e+f x)\right )}{b f}+\frac{\left (a^2 (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}}}{\left (a^2-x^2\right )^2} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac{F_1\left (\frac{1}{2};2,\frac{2+m}{2};\frac{3}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a^2 f}+\frac{b^2 F_1\left (\frac{3}{2};2,\frac{2+m}{2};\frac{5}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan ^3(e+f x)}{3 a^4 f}-\frac{\left (a (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int \frac{\left (1+\frac{x}{b^2}\right )^{-1-\frac{m}{2}}}{\left (a^2-x\right )^2} \, dx,x,b^2 \tan ^2(e+f x)\right )}{b f}\\ &=\frac{2 a b (d \cos (e+f x))^m \, _2F_1\left (2,-\frac{m}{2};1-\frac{m}{2};\frac{b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right )^2 f m}+\frac{F_1\left (\frac{1}{2};2,\frac{2+m}{2};\frac{3}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a^2 f}+\frac{b^2 F_1\left (\frac{3}{2};2,\frac{2+m}{2};\frac{5}{2};\frac{b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan ^3(e+f x)}{3 a^4 f}\\ \end{align*}

Mathematica [C]  time = 3.12785, size = 361, normalized size = 1.59 \[ -\frac{2 (m+4) \sec ^2(e+f x) (d \cos (e+f x))^m (a \cos (e+f x)+b \sin (e+f x))^5 F_1\left (m+3;\frac{m}{2}+1,\frac{m}{2}+1;m+4;\frac{a-i b}{a+b \tan (e+f x)},\frac{a+i b}{a+b \tan (e+f x)}\right )}{b f (m+3) (a+b \tan (e+f x))^5 \left ((m+2) \cos (e+f x) \left ((a+i b) F_1\left (m+4;\frac{m}{2}+1,\frac{m}{2}+2;m+5;\frac{a-i b}{a+b \tan (e+f x)},\frac{a+i b}{a+b \tan (e+f x)}\right )+(a-i b) F_1\left (m+4;\frac{m}{2}+2,\frac{m}{2}+1;m+5;\frac{a-i b}{a+b \tan (e+f x)},\frac{a+i b}{a+b \tan (e+f x)}\right )\right )+2 (m+4) (a \cos (e+f x)+b \sin (e+f x)) F_1\left (m+3;\frac{m}{2}+1,\frac{m}{2}+1;m+4;\frac{a-i b}{a+b \tan (e+f x)},\frac{a+i b}{a+b \tan (e+f x)}\right )\right )} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(d*Cos[e + f*x])^m/(a + b*Tan[e + f*x])^2,x]

[Out]

(-2*(4 + m)*AppellF1[3 + m, 1 + m/2, 1 + m/2, 4 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e +
f*x])]*(d*Cos[e + f*x])^m*Sec[e + f*x]^2*(a*Cos[e + f*x] + b*Sin[e + f*x])^5)/(b*f*(3 + m)*((2 + m)*((a + I*b)
*AppellF1[4 + m, 1 + m/2, 2 + m/2, 5 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])] + (a
 - I*b)*AppellF1[4 + m, 2 + m/2, 1 + m/2, 5 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x]
)])*Cos[e + f*x] + 2*(4 + m)*AppellF1[3 + m, 1 + m/2, 1 + m/2, 4 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b
)/(a + b*Tan[e + f*x])]*(a*Cos[e + f*x] + b*Sin[e + f*x]))*(a + b*Tan[e + f*x])^5)

________________________________________________________________________________________

Maple [F]  time = 0.306, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d\cos \left ( fx+e \right ) \right ) ^{m}}{ \left ( a+b\tan \left ( fx+e \right ) \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(f*x+e))^m/(a+b*tan(f*x+e))^2,x)

[Out]

int((d*cos(f*x+e))^m/(a+b*tan(f*x+e))^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d \cos \left (f x + e\right )\right )^{m}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

integrate((d*cos(f*x + e))^m/(b*tan(f*x + e) + a)^2, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (d \cos \left (f x + e\right )\right )^{m}}{b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

integral((d*cos(f*x + e))^m/(b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) + a^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d \cos{\left (e + f x \right )}\right )^{m}}{\left (a + b \tan{\left (e + f x \right )}\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))**m/(a+b*tan(f*x+e))**2,x)

[Out]

Integral((d*cos(e + f*x))**m/(a + b*tan(e + f*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d \cos \left (f x + e\right )\right )^{m}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="giac")

[Out]

integrate((d*cos(f*x + e))^m/(b*tan(f*x + e) + a)^2, x)